import request from '@/utils/request'

//sys
const api = {

  // *中1 报警和故障趋势接口
  // http://122.9.33.163:6300/project/18/interface/api/144
  faultTrend(sendData) {
    return request.request({
      url: '/api/home/safe/faultTrend',
      method: 'GET',
      params: sendData,
      loading: false,
    })
  },

  // *中2 工单信息接口
  // http://122.9.33.163:6300/project/18/interface/api/90
  projectList(sendData) {
    return request.request({
      url: '/api/home/safe/projectList',
      method: 'GET',
      params: sendData,
      loading: false,
    })
  },

  // *右1 设备数量统计接口
  // http://122.9.33.163:6300/project/18/interface/api/102
  devNum(sendData) {
    return request.request({
      url: '/api/home/safe/devNum',
      method: 'GET',
      params: sendData,
      loading: false,
    })
  },

  // *左1 故障处理、今日报警、今日故障数量统计接口
  // http://122.9.33.163:6300/project/18/interface/api/72
  faultNum(sendData) {
    return request.request({
      url: '/api/home/safe/faultNum',
      method: 'GET',
      params: sendData,
      loading: false,
    })
  },

  // *左2 故障类型及其故障数量统计接口
  // http://122.9.33.163:6300/project/18/interface/api/84
  faultType(sendData) {
    return request.request({
      url: '/api/home/safe/faultType',
      method: 'GET',
      params: sendData,
      loading: false,
    })
  },

  // role-dic
  // http://122.9.33.163:6300/project/3/interface/api/53
  role-dic(sendData) {
    return request.request({
      url: '/sys/role-dic',
      method: 'GET',
      params: sendData,
      loading: false,
    })
  },

  // type-dic
  // http://122.9.33.163:6300/project/3/interface/api/56
  type-dic(sendData) {
    return request.request({
      url: '/sys/type-dic',
      method: 'GET',
      params: sendData,
      loading: false,
    })
  },

  // 修改用户信息
  // http://122.9.33.163:6300/project/3/interface/api/62
  edit(sendData) {
    return request.request({
      url: '/sys/sys-user/edit',
      method: 'POST',
      data: sendData,
      loading: false,
    })
  },

  // 删除用户
  // http://122.9.33.163:6300/project/3/interface/api/65
  del(sendData) {
    return request.request({
      url: '/sys/sys-user/del',
      method: 'POST',
      data: sendData,
      loading: false,
    })
  },

  // 用户列表
  // http://122.9.33.163:6300/project/3/interface/api/50
  list(sendData) {
    return request.request({
      url: '/sys/sys-user/list',
      method: 'GET',
      params: sendData,
      loading: false,
    })
  },

  // 管理员修改用户密码
  // http://122.9.33.163:6300/project/3/interface/api/59
  editPwd(sendData) {
    return request.request({
      url: '/sys/sys-user/editPwd',
      method: 'POST',
      data: sendData,
      loading: false,
    })
  },
}
export default api